package com.example.rabbit.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 *  死信重定向队列
 */
@RabbitListener(queues = "tredirect_queue")
@Component
public class RedirectQueueConsumer {
    @RabbitHandler
    public void fromDeadLetter(String msg){
        System.out.println("我是死信的重定向 队列 的消费者,内容:"+msg);
    }
}
